package com.czxy.demo01;

import java.util.Scanner;

/**
 * Created by hp on 2020/1/7.
 */
public class Test01 {
    public static void main(String[] args) {
        System.out.println("请输入一个数字");
        Scanner sc = new Scanner(System.in);
        int i = sc.nextInt();
        if (i%3==0&&i%5==0&&i%7==0){
            System.out.println("能同时被3,5,7整除");
        }
        else if (i%3==0||i%5==0){
            System.out.println("能被3,5整除");
        }
        else if (i%3==0||i%7==0){
            System.out.println("能被3,7整除");
        }
        else if (i%5==0||i%7==0){
            System.out.println("能被5,7整除");
        }
        else if (i%3==0){
            System.out.println("能被3整除");
        }
        else if (i%5==0){
            System.out.println("能被5整除");
        }
        else if (i%7==0){
            System.out.println("能被7整除");
        }
        else {
            System.out.println("不能被3,5,7任一个整除");
        }
    }
}
